import java.util.Scanner;

public class Text {
    public static void main(String[] args) {
        int a=0,b=0,c=0,max=0,ret;
        Scanner scanner=new Scanner(System.in);
        a= scanner.nextInt();
        b= scanner.nextInt();
        ret=max(a,b,max);
        System.out.println(ret);
        a= scanner.nextInt();
        b= scanner.nextInt();
        c= scanner.nextInt();
        ret=max(a,b,c,max);
        System.out.println(ret);
    }
    public static int max(int a,int b,int max){
        if(a>b){
            max=a;
        }else{
            max=b;
        }
        return max;
    }
    public static int max(int a,int b,int c,int max){
        if(a>=b&&a>=c){
            max=a;
        }else if(b>=a&&b>=c){
            max=b;
        }else{
            max=c;
        }
        return max;
    }
}
